#include<iostream>
#include<vector>
#include<list>
#include<deque>
#include<algorithm>
#include<map>
#include<string>
using namespace std;

struct display {
	void operator()(pair<string,double> x) {
		cout << x.first<<" " << x.second << endl;
	}
};
	
int main(){
	map<string, double> score;
    score["a"] = 90.2;
    score["python"] = 89.2;
    score["lili"] = 60.012;
    score.insert(map<string, double>::value_type("ni", 89.5));
    map<string, double>::iterator i;
    for (i = score.begin(); i != score.end(); i++) {
		cout << i->first << " " << i->second << endl;
}

    for_each(score.begin(), score.end(),display());
	i = score.find("a");
    if (i != score.end()) {
		cout << i->second << endl;
}


	for (i = score.begin(); i != score.end(); ) {
		if (i->second < 90.0) {
			i=score.erase(i);
		}
		else {
			++i;
		}
	}
	for_each(score.begin(), score.end(), display());

}
